package com.wander.business.book.c2_2_5;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * @author Wander.Zeng
 * @create 2017-10-22 15:20
 * @desc DemoPublisher
 */
@Component
public class DemoPublisher {

    @Autowired
    private ApplicationContext applicationContext;

    public void publisher(String msg) {
        applicationContext.publishEvent(new DemoEvent(this, msg));
    }

}
